<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="Veterinaria.modelo.Paciente"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type='text/javascript'> 
<!--
function CargarFoto(img, ancho, alto){  
	derecha=(screen.width-ancho)/2;  
	arriba=(screen.height-alto)/2;  
	string="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";  
	fin=window.open(img,"",string);
}
// -->
</script> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Reporte de Paciente - petVida - Veterinaria</title>
<style type="text/css">
<!--
.Estilo1 {	font-family: Tahoma;
	font-weight: bold;
	font-size: 18px;
	
}
.Estilo4 {font-family: Tahoma; font-weight: bold; font-size: 12px; }
.Estilo5 {font-family: Tahoma;  font-size: 10px;}
-->
</style>
</head>

<body>
<table width="1124" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><p align="left"><img src="img/logo3.jpg" alt="s" width="472" height="185" /></p></td>
    <td><p>&nbsp;</p>
        <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p align="right" class="Estilo1">Reporte Paciente  </p></td>
  </tr>
  <tr bgcolor="#CCCCCC">
    <td height="10" colspan="2"><div align="right"></div></td>
  </tr>
</table>
<%@include file="navegador.jsp" %> 
    <td width="914"><form name="form1" method="post" action="ReportePacienteServlet">
      <table width="263" border="0" align="center">
        <tr class="Estilo4">
          <td width="51"><label>
            <div align="center">Nombre</div>
          </label></td>
          <td width="24"><div align="center">Raza</div></td>
          <td width="25"><div align="center">Estado</div></td>
        </tr>
        <tr>
          <td><label>
            <input type="text" name="txtNombre" />
          </label></td>
          <td><label>
            <input type="text" name="txtRaza" />
          </label></td>
          <td><label>
            <select name="select">
			  <option></option>
              <option value="1">Activo</option>
              <option value="0">Desactivo</option>
            </select>
          </label></td>
        </tr>
        <tr>
          <td colspan="3"><div align="center">
            <input type="submit" name="Submit" value="Buscar" />
          </div></td>
        </tr>
      </table>
        </form>
      <table width="872" border="0" align="center">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><table width="872" border="0" align="center">
            <tr bgcolor="#CCCCCC" class="Estilo4">
              <td width="79"><div align="center">idPaciente</div></td>
              <td width="63"><div align="center">idDueno</div></td>
              <td width="120"> <div align="center">Nombre Due&ntilde;o </div></td>
              <td width="69"><div align="center">Nombre</div></td>
              <td width="51"><div align="center">Raza</div></td>
              <td width="30"><div align="center">Genero</div></td>
              <td width="69"><div align="center">Tipo Sangre </div></td>
              <td width="62"><div align="center">Tama&ntilde;o</div></td>
              <td width="48"><div align="center">Peso</div></td>
              <td width="47"><div align="center">Esteril</div></td>
              <td width="101"><div align="center">Fec Nacimiento </div></td>
              <td width="58"><div align="center">Notas</div></td>
              <td width="58"><div align="center">Estado</div></td>
              <td width="58"><div align="center">Imagen</div></td>
            </tr>
            <%@page import="java.util.*, Veterinaria.modelo.Paciente" %>
			<%
			Collection<Paciente> arreglo = (ArrayList<Paciente>)request.getAttribute("pacientes");
			if(arreglo != null) { 
			int i = 1;
			for(Paciente x : arreglo) {
			%>  
			  <tr class="Estilo5">
			    <td><div align="center" >
			      <% out.print(x.getCodigo_paciente()); %>
			      </div></td>
			    <td><div align="center" ><% out.print(x.getoPersona().getCodigo_persona()); %></div></td>
			    <td><% out.print(x.getoPersona().getNombre_persona() + " " + x.getoPersona().getApellido_persona()); %></td>
			    <td><% out.print(x.getNombre_paciente()); %></td>
			    <td><% out.print(x.getRaza()); %></td>
			    <td><div align="center" ><% out.print(x.getGenero()); %></div></td>
			    <td><div align="center" ><% out.print(x.getTipo_sangre()); %></div></td>
			    <td><% out.print(x.getTamano()); %></td>
			    <td><% out.print(x.getPeso()); %></td>
			    <td><div align="center" ><% out.print(x.getEsteril()); %></div></td>
			    <td><% out.print(x.getFec_nacimiento()); %></td>
			    <td><% out.print(x.getNotas()); %></td>
			    <%String estado = null;
			    	if (x.getEstado().equals("1")){
			    		estado="Activo";
			    	}
			    	else{
			    		estado="Desactivo";
			    	}
			    %>
			    <td><% out.print(estado); %></td>
			    <td><a href="javascript:CargarFoto('<% out.print(x.getImagen_paciente()); %>','250','300')"><center>Ver</center></a></td>
			       </div></td>
			       <td></td>
			       
			     <td>&nbsp;</td>
			     <td>&nbsp;</td>
			  </tr>
			<% }  
			  } %>
            <tr>
              <td>&nbsp;</td>
              <td colspan="2">&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table></td>
        </tr>
      </table>
      <p>&nbsp;</p>
    <label></label></td>
  </tr>
  <tr >
    <td colspan="2" ><div align="center"><span class="Estilo4">Desarrollado por Grupo ThunderBolt<img src="img/Rayo.png" alt="s" width="28" height="21" /></span> </div></td>
  </tr>
</table>
<p></p>
</body>
</html>
